<%@page import="java.rmi.Remote"%>
<%@ page language="java" import="java.util.*,mySql.*" pageEncoding="utf-8"%>
<%@ page import="show_shop.*" %>
<%@ page import="java.sql.PreparedStatement"%>
<%@ page import="java.sql.ResultSet"%>
<%@ page import="java.sql.Connection"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>  
  
    <title>head</title> 

	<link rel="stylesheet" type="text/css" href="../css/manage_delete.css">
  

   

  </head>
  
 <body>
   <!-- header begin -->
   <div class="header">
	<div class="top-header">
	<div class="phone">
	<ul>
	<li class="tele"></li>
	<li class="telenum">
	<p>13739477470</p>
	</li>
	</ul>
	</div>
	
	<div class="logo">
	<h1><a href="http://localhost:8080/practise/jsp/manage_head.jsp">商品删除</a></h1>
	</div>
	
</div>
   </div>
   <!-- header end -->
   
   <!-- banner begin -->
   <div class="top_banner">
   <div class="navigation">
   <ul>
   <b>
   <li><a href="http://localhost:8080/practise/jsp/manage_order.jsp">订单详情</a></li>
   <li><a href="http://localhost:8080/practise/jsp/manage_publish.jsp">商品发布</a></li>
   <li><a href="http://localhost:8080/practise/jsp/manage_delete.jsp">商品删除</a></li>
   </b>
   </ul>
   </div>
 
   </div>
   <!-- banner end -->
   
   <!-- body_content begin -->
   <div class="all">
   
   <%
   			response.setContentType("text/html;charset=gb2312");
  			request.setCharacterEncoding("utf-8");
			response.setCharacterEncoding("UTF-8");
  			String login_name="root";
			String login_password="2014121167";
			String driverClass="com.mysql.jdbc.Driver";
			String url="jdbc:mysql://localhost:3306/test";
			Connection con=null;
			PreparedStatement pst=null;
			ResultSet rs=null;	
			int p=0;
			ArrayList<goods_bean> delete_list=new ArrayList<goods_bean>();
			
			
			DBConnection dbcon=new DBConnection(driverClass,url,login_password,login_name);
			try
			{
					con=dbcon.getConnection();
   					pst=con.prepareStatement("select * from goods_detail");
   					rs=pst.executeQuery();
   					while(rs.next())
   					{
   						goods_bean delete_goods=new goods_bean();
   						delete_goods.setPicture(rs.getString(1));
   						delete_goods.setName(rs.getString(2));
   						delete_goods.setPrice(rs.getString(3));
   						delete_list.add(delete_goods);
   					}
   					session.setAttribute("delete_list", delete_list);
			}
			
			catch (Exception e) {
				e.getStackTrace();
			}
    %>
<% delete_list=(ArrayList<goods_bean>)session.getAttribute("delete_list"); %>
  		 <!--one begin  -->
  		 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 				<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- one end -->
		
		<!-- two begin -->
			  		 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 			<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- two end -->
		
		<!-- three begin -->
			 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- three end -->
		
		<!-- four begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- four end -->

		<!-- five begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- five end -->

		<!-- six begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- six end -->

		<!-- seven begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- seven end -->
		
		<!-- eight begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- eight end -->
		
		<!-- nine begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- nine end -->
		
		
		<!-- ten begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 			<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- ten end -->
		
			<!-- eleven begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- eleven end -->
		
			<!-- twelve begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- twelve end -->
		
			<!-- thirteen begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- thirteen end -->
		
			<!-- fourteen begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- fourteen end -->
		
			<!-- fifteen begin -->
				 <%  
			if(p<delete_list.size())  	
			{	 
  		  %>
		<div class="box">
			<div class="order_left">
 				商品名：<%=delete_list.get(p).getName() %>
 			</div>
 			<div class="order_right">
 		<a href="http://localhost:8080/practise/servlet/delete_goods?id=<%=delete_list.get(p).getName()%>">删除商品</a>
 			</div>
		</div>
			<%
		p++;
		}
		 %>
		<!-- fifteen end -->

		 
  </div>
   
   <!-- body_content end -->
   
   <!-- bottom begin -->
   <div class="bottom_show">
   <div class="picture_1">
 	<a href="#"></a>
   </div>
   <div class="picture_2">
 <a href="#"></a>
   </div>   
   <div class="picture_3">
  <a href="#"></a>
   </div>
    <div class="picture_4">
  <a href="#"></a>
   </div>
   
   
   </div>
      <div class="bottom_bar"></div>
   <div class="bottom_word">
	<p>航空港校区 | 四川省成都市西南航空港经济开发区学府路一段24号 | 右边610225 | 电话:028-85966502</p>
	<p>龙泉校区 | 成都市龙泉驿阳光城幸福路10号 | 邮编:610103 | 电话:028-84833333</p>
	<p>Copyringht 2003_2014 成都信息工程大学 建议使用IE8.0,1034*860以上浏览</p>
   </div>
   <!-- bottom end -->
   
  </body>
</html>
